package com.example.im.ui.fragment

import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.view.View
import android.webkit.WebViewClient
import androidx.appcompat.app.AlertDialog
import com.example.im.xmpp.IMConnection
import com.example.im.R
import com.example.im.common.Constants
import com.example.im.http.APIRetrofit
import com.example.im.http.RetrofitManager
import com.example.im.manager.ActivityCollector
import com.example.im.ui.activity.AccessActivity
import com.example.im.mvp.base.BasePresenter
import com.example.im.ui.abstracts.AbstractBaseFragment
import com.example.im.db.DatabaseStorage
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.fragment_main_mine.*
import com.trello.rxlifecycle2.RxLifecycle.bindUntilEvent
import kotlinx.android.synthetic.main.fragment_main_home.*


class MainHomeFragment : AbstractBaseFragment<BasePresenter<*>>() {


    companion object {
        fun newInstance(): MainHomeFragment {
            return MainHomeFragment()
        }
    }

    override val layoutId: Int
        get() = R.layout.fragment_main_home

    override fun initView() {
        web_view.setWebViewClient(WebViewClient())
        web_view.getSettings().setDomStorageEnabled(true)
        web_view.getSettings().setDatabaseEnabled(true)
        web_view.getSettings().setJavaScriptEnabled(true)
        web_view.loadUrl("https://www.tmall.com/")
    }

    override fun initPresenter() {

    }

    override fun initLazyLoad() {

    }

}